package com.lanlian.commonlib.bean.db;

import com.lanlian.commonlib.bean.RespUserLogin;
import com.lanlian.commonlib.bean.UserInfo;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;

/**
 * <pre>
 *     author : huxiaobo
 *     e-mail : huxiaobo@xlanlian.com
 *     date   : 2018/8/21 10:02
 *     desc   : 本地数据库User类
 *     version: 1.0
 * </pre>
 */
@Entity
public class DBUser {

    @Id
    private Long id;//用户ID
    private String accountNo;//账号
    private String userName;//用户名
    private int type;//用户层级
    private String mail;
    private String mobile;
    private String mobileNo;
    private int examineStatus;//审核状态 "1": "未审批","2": "审批成功","3": "审批失败"
    private int status;//用户状态 "1": "正常","2": "冻结"
    private int tradeType;//交易类型 "1": "正常交易","2": "模拟交易"
    private String yuJing;//预警线
    private String pingCang;//平仓线
    private String realName;//用户真实姓名
    private String idCard;//身份证号
    private int male;//性别(值的含义对应枚举中找)
    private String bankType;//银行类型(值的含义对应枚举中找)
    private String bankCard;//银行卡号
    private String bankProvince;//开户省(值的含义对应枚举中找)
    private String bankCity;//开户市(值的含义对应枚举中找)
    private String bankBranch;//开户支行
    private String createDate;//开户时间
    private int tradeTips;//交易是否提示(值的含义对应枚举中找)
    private int systemType;//所属系统(1:期货,3:证券,其他暂时没有)
    private Long lUnitId;//账户id
    private Long no;//用户编号
    private int riskAuthState;//1：已风险调研，0：未风险调研
    private int accountType;

    @Generated(hash = 138933025)
    public DBUser() {
    }

    public DBUser(RespUserLogin respUserLogin) {
        UserInfo userInfo = respUserLogin.getUserInfo();
        this.id = userInfo.getId();
        this.accountNo = userInfo.getAccountNo();
        this.realName = userInfo.getRealName();
        this.mobile = userInfo.getMobile();
        this.mobileNo = userInfo.getMobileNo();
        this.mail = userInfo.getMail();
        if (userInfo.getMale() == null) {
            this.male = 1;
        } else {
            this.male = userInfo.getMale();
        }
        this.bankCard = userInfo.getBankCard();
        this.bankBranch = userInfo.getBankBranch();
        this.bankType = userInfo.getBankType();
        this.lUnitId = userInfo.getlUnitId();
        this.no = userInfo.getNo();
        this.riskAuthState = userInfo.getRiskAuthState();
        this.accountType = userInfo.getAccountType();
    }

    @Generated(hash = 707562401)
    public DBUser(Long id, String accountNo, String userName, int type, String mail,
            String mobile, String mobileNo, int examineStatus, int status, int tradeType,
            String yuJing, String pingCang, String realName, String idCard, int male,
            String bankType, String bankCard, String bankProvince, String bankCity,
            String bankBranch, String createDate, int tradeTips, int systemType,
            Long lUnitId, Long no, int riskAuthState, int accountType) {
        this.id = id;
        this.accountNo = accountNo;
        this.userName = userName;
        this.type = type;
        this.mail = mail;
        this.mobile = mobile;
        this.mobileNo = mobileNo;
        this.examineStatus = examineStatus;
        this.status = status;
        this.tradeType = tradeType;
        this.yuJing = yuJing;
        this.pingCang = pingCang;
        this.realName = realName;
        this.idCard = idCard;
        this.male = male;
        this.bankType = bankType;
        this.bankCard = bankCard;
        this.bankProvince = bankProvince;
        this.bankCity = bankCity;
        this.bankBranch = bankBranch;
        this.createDate = createDate;
        this.tradeTips = tradeTips;
        this.systemType = systemType;
        this.lUnitId = lUnitId;
        this.no = no;
        this.riskAuthState = riskAuthState;
        this.accountType = accountType;
    }

    public void setUser(RespUserLogin respUserLogin) {
        UserInfo userInfo = respUserLogin.getUserInfo();
        this.id = userInfo.getId();
        this.accountNo = userInfo.getAccountNo();
        this.realName = userInfo.getRealName();
        this.mobile = userInfo.getMobile();
        this.mail = userInfo.getMail();
        if (userInfo.getMale() == null) {
            this.male = 1;
        } else {
            this.male = userInfo.getMale();
        }
        this.bankCard = userInfo.getBankCard();
        this.lUnitId = userInfo.getlUnitId();
        this.mobileNo = userInfo.getMobileNo();
        this.no = userInfo.getNo();
        this.bankBranch = userInfo.getBankBranch();
        this.bankType = userInfo.getBankType();
        this.riskAuthState = userInfo.getRiskAuthState();
        this.accountType = userInfo.getAccountType();
    }

    public Long getLUnitId() {
        return this.lUnitId;
    }

    public void setLUnitId(Long lUnitId) {
        this.lUnitId = lUnitId;
    }

    public int getSystemType() {
        return this.systemType;
    }

    public void setSystemType(int systemType) {
        this.systemType = systemType;
    }

    public int getTradeTips() {
        return this.tradeTips;
    }

    public void setTradeTips(int tradeTips) {
        this.tradeTips = tradeTips;
    }

    public String getCreateDate() {
        return this.createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getBankBranch() {
        return this.bankBranch;
    }

    public void setBankBranch(String bankBranch) {
        this.bankBranch = bankBranch;
    }

    public String getBankCity() {
        return this.bankCity;
    }

    public void setBankCity(String bankCity) {
        this.bankCity = bankCity;
    }

    public String getBankProvince() {
        return this.bankProvince;
    }

    public void setBankProvince(String bankProvince) {
        this.bankProvince = bankProvince;
    }

    public String getBankCard() {
        return this.bankCard;
    }

    public void setBankCard(String bankCard) {
        this.bankCard = bankCard;
    }

    public String getBankType() {
        return this.bankType;
    }

    public void setBankType(String bankType) {
        this.bankType = bankType;
    }

    public int getMale() {
        return this.male;
    }

    public void setMale(int male) {
        this.male = male;
    }

    public String getIdCard() {
        return this.idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getRealName() {
        return this.realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getPingCang() {
        return this.pingCang;
    }

    public void setPingCang(String pingCang) {
        this.pingCang = pingCang;
    }

    public String getYuJing() {
        return this.yuJing;
    }

    public void setYuJing(String yuJing) {
        this.yuJing = yuJing;
    }

    public int getTradeType() {
        return this.tradeType;
    }

    public void setTradeType(int tradeType) {
        this.tradeType = tradeType;
    }

    public int getStatus() {
        return this.status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getExamineStatus() {
        return this.examineStatus;
    }

    public void setExamineStatus(int examineStatus) {
        this.examineStatus = examineStatus;
    }

    public String getMobile() {
        return this.mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getMail() {
        return this.mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public int getType() {
        return this.type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getUserName() {
        return this.userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getAccountNo() {
        return this.accountNo;
    }

    public void setAccountNo(String accountNo) {
        this.accountNo = accountNo;
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getNo() {
        return this.no;
    }

    public void setNo(Long no) {
        this.no = no;
    }

    public String getMobileNo() {
        return this.mobileNo;
    }

    public void setMobileNo(String mobileNo) {
        this.mobileNo = mobileNo;
    }

    public int getRiskAuthState() {
        return this.riskAuthState;
    }

    public void setRiskAuthState(int riskAuthState) {
        this.riskAuthState = riskAuthState;
    }

    public int getAccountType() {
        return this.accountType;
    }

    public void setAccountType(int accountType) {
        this.accountType = accountType;
    }

}
